package com.wulijie.strategy;

/**
 * @Author cui
 * @Data
 */
public class Duck {
    String name;
    FlyBehavior flyBehavior;

    public void fly() {
        if (null != flyBehavior) {
            flyBehavior.fly();
        }
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public FlyBehavior getFlyBehavior() {
        return flyBehavior;
    }

    public void setFlyBehavior(FlyBehavior flyBehavior) {
        this.flyBehavior = flyBehavior;
    }
}
